import axios from 'axios'

export function request(config) {
    //创建实例
    const instance = axios.create({
        baseURL: 'http://123.207.32.32:8000',
        timeout: 5000
    })
    //拦截器
    //请求
    instance.interceptors.request.use(config => {
        return config
    }, err => {

    })
    //响应
    instance.interceptors.response.use(res => {
        return res.data
    }, err => {

    })
    //发送真正网络请求
    return instance(config)

}